<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
// api.tp5.com===>www.tp5.com/index.php/api
//第一个api代表的二级域名的api  后面的是代表的url中的api

Route::group('demo',[
    ':id' => ['home/login/index',['method'=>'get'],['id'=>'\d{1,4}']],
    ':name' => ['index/user/demo2',['method'=>'get'],['name'=>'[a-zA-z]+']],
    ':isOK' => ['index/user/demo3',['method'=>'get'],['isOK'=>'0|1']]
]);
